package bigdata;

public class RateUpdater {
	
	public static boolean update(VisitData visit){
		
		int userRate= SqlDB.getRate(visit.visitId);
		
		
		//decline
		if(visit.status==6)
			
			SqlDB.setRate(visit.visitId,userRate-1);
		
		
		//accept 
		else if(visit.status==13)
			
			SqlDB.setRate(visit.visitId, userRate+1);
			
		return true;
	}
	

}
